package org.example.Service.impl;

import org.example.Mapper.Studentmapper;
import org.example.Service.StudentsService;
import org.example.entity.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class StudentsServiceimpl implements StudentsService {


    @Autowired
    Studentmapper studentmapper;

    @Override
    public void insert(Student student) {
        studentmapper.insert(student);

    }

    @Override
    public void delete(Integer id) {
        studentmapper.delete(id);
    }

    @Override
    public void update(Student student) {
        studentmapper.update(student);
    }

    @Override
    public Student getid(Integer id) {
        Student getid = studentmapper.getid(id);
        return getid;
    }

    @Override
    public List<Student> getall() {
        List<Student> s = studentmapper.getall();
        return s;
    }
}
